Partial Public Class Mock(Of T)



	Private value As Integer
	Public Property MyValue() As Integer
		Get
			Return value
		End Get
		Set(ByVal value As Integer)
			value = value
			Me.RaiseMyValueChanged()
		End Set
	End Property

	' TODO: DataBinding - Implement instance validation here
	Protected Overridable Sub DoValidate()

	End Sub

	' TODO: DataBinding - Implement initialization here
	Protected Overridable Sub DoInitialize()

	End Sub


End Class

Partial Public Class MockBase
	Public ValidateCalls As Integer
	Public InitializeCalls As Integer

	Public Sub Ensure()
	End Sub


	Private _baseIntValue As Integer

	Public Property BaseIntValue() As Integer

		Get
			Return _baseIntValue
		End Get
		Set(ByVal value As Integer)
			_baseIntValue = value
			Me.RaiseBaseIntValueChanged()
		End Set
	End Property

	Private _baseObject As Object

	Public Property BaseObject() As Object
		Get
			Return _baseObject
		End Get
		Set(ByVal value As Object)
			_baseObject = value
			Me.RaiseBaseObjectChanged()
		End Set
	End Property

	' TODO: XamlBinding - Implement instance validation here
	Protected Overridable Sub DoValidate()

	End Sub

	' TODO: XamlBinding - Implement initialization here
	Protected Overridable Sub DoInitialize()

	End Sub


End Class

Partial Public Class MockDerived
	Inherits MockBase


	Private _derivedIntValue As Integer
	Public Property DerivedIntValue() As Integer
		Get
			Return _derivedIntValue
		End Get
		Set(ByVal value As Integer)
			_derivedIntValue = value
			Me.RaiseDerivedIntValueChanged()
		End Set
	End Property


	Private _derivedObject As Object
	Public Property DerivedObject() As Object
		Get
			Return _derivedObject
		End Get
		Set(ByVal value As Object)
			_derivedObject = value
			Me.RaiseDerivedObjectChanged()
		End Set
	End Property


	Private _mock As MockBase
	Public Property Mock() As MockBase
		Get
			Return _mock
		End Get
		Set(ByVal value As MockBase)
			_mock = value
			Me.RaiseMockChanged()
		End Set
	End Property

	' TODO: XamlBinding - Implement instance validation here
	Protected Overrides Sub DoValidate()
		MyBase.DoValidate()

		Console.WriteLine("Hello World")
	End Sub

	' TODO: XamlBinding - Implement initialization here
	Protected Overrides Sub DoInitialize()
		MyBase.DoInitialize()
		' hello world!
	End Sub

	Public Sub DoSomething()
	End Sub

End Class